/* 容器样式 */
.w {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
    width: 80%;
    margin: 0 auto;
    position: relative;
}

/* 链接样式 */
a {
    text-decoration: none;
    display: block;
    padding: 0 20px;
    font-size: 16px;
    line-height: 60px;
    transition: color 0.3s ease;
    color: #ff7b00;
    font-size: 20px;
    width: 100px;
    text-align: center;
}

a:hover {
    color: #ff0000;
}

.active {
    font-weight: 700;
    color: #ff0000;
}


nav {
    width: 100%;
    height: 60px;
    background-image: linear-gradient(to right, #edff47, #66ff47);
    margin-bottom: 30px;
    box-shadow: 6px 7px 11px rgba(0, 0, 0, 0.2);

}

.indicator {
    width: 50px;
    height: 4px;
    background-color: #ff0000;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translateX(50%);
    transition: left 0.3s;
}


a:nth-child(1).active~.indicator {
    left: 0;
}

a:nth-child(2).active~.indicator {
    left: 100px;
}